yield curve: Yield curve in BondProc

Description Details Author(s) Examples

Description

This page describes usage of yield curve in BondProc packages.

Details

Yield curve in Bond proc can be specyfied in four different ways:

Author(s)

Zygmunt Zawadzki

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
bond = newBond(face=100,maturity=10,coupon=0.1,n.pay=6)

# Valuation of bonds

# Using sigle value
getBondPrice(bond,r= 0.1)

# Using multiple values
r = seq(1,10,length.out=60)/100
getBondPrice(bond,r)

# yield curve as a function
rf <- function(t) (t*2)/100
getBondPrice(bond,rf)

# Using Nelson-Siegel model
ns = newNelsonSiegel(alpha1=0.06,0.03,0.02,1)
getBondPrice(bond,ns)

zzawadz/BondProc documentation built on May 5, 2019, 2:39 a.m.